package top.dark.design.patterns.factory.factorymethod;

/**
 * Author: Darkn
 * description:
 * Create Time: 2021/4/24 21:30
 */
public class LDOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals("Greek")) {
            pizza = new LDGreePizza();
            pizza.setName("伦敦希腊披萨");
        } else if (orderType.equals("Cheese")) {
            pizza = new LDChessePizza();
            pizza.setName("伦敦芝士披萨");
        }
        return pizza;
    }
}
